#include <iostream>
using namespace std;


template<class T>
void Function1(T& t)
{
	int a = 0;
	T x = a;

	cout << &a << endl;
	cout << &x << endl;
}

template<class T>
void Function2(T&& t)
{
	int a = 0;
	T x = a;

	cout << &a << endl;
	cout << &x << endl << endl;
}

int main()
{
	int a = 1;
	int& la = a;

	Function1(a);
	cout << endl;

	Function1(la);
	cout << a << " " << la << endl;

	Function2(a);
	cout << endl;

	Function2(la);
	cout << a << " " << la << endl;

	return 0;
}